package string;

public class 去除空格 {
    public static void main(String[] args) {
        String asdasd = replaceSpace("ab ");
        System.out.println(asdasd);
    }
    public static String replaceSpace(String s) {
        String rtn="";
        String[] res=s.split(" ");
        for(String f:res){
            rtn+=f+"%20";
        }
        rtn=rtn.substring(0,rtn.length()-3);
        return rtn;
    }
}
